<?php

namespace App\Services\FourElement;

use App\Services\FourElement\Drivers\JunziqianFourElementVerifier;
use App\Services\FourElement\Drivers\LogFourElementVerifier;
use Illuminate\Support\Manager;
use Psr\Log\LoggerInterface;

class FourElementVerifierManager extends Manager
{
    public function getDefaultDriver()
    {
        return $this->config->get('four-element.default', 'log');
    }

    protected function createLogDriver(): FourElementVerifier
    {
        return new LogFourElementVerifier($this->container->make(LoggerInterface::class));
    }

    protected function createJunziqianDriver(): FourElementVerifier
    {
        $config = $this->config->get('four-element.drivers.junziqian', []);

        return new JunziqianFourElementVerifier($config);
    }
}
